#include<bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define uint unsigned int
#define DU double
#define PII pair<int,int>
#define PLL pair<ll,ll>
#define rep(i,x,n) for(int i=(x);i<=(n);i++)
#define nep(i,x,n) for(int i=(x);i>=(n);i--)
using namespace std;
const int N=1e5+10;
int n,a[N];
multiset<int>s;
inline int read(){
	int s=0,f=1;
	char ch=getchar();
	while(!isdigit(ch)){
		if(ch=='-') f=-1;
		ch=getchar();
	}
	while(isdigit(ch)){
		s=(s<<3)+(s<<1)+(ch^48);
		ch=getchar();
	}
	return s*f;
}
inline void print(int x){
	if(x<0){putchar('-');x=-x;}
	if(x>9) print(x/10);
	putchar(x%10+'0');
}
inline void Solve(){
	n=read();rep(i,1,n) a[i]=read();
	sort(a+1,a+n+1);
	rep(i,1,n){
		s.insert(a[i]);
		if(a[i]!=(*s.begin())){
			int t=(*s.begin());
			auto it=s.find(t);
			s.erase(it);
		}
	}
	int res=(int)s.size();
	print(res),puts("");
}
int main(){
	freopen("duel.in","r",stdin);
	freopen("duel.out","w",stdout);
	int Tests=1;
	while(Tests--) Solve();
	return 0;
}